import PySimpleGUI as sg
from collections import  namedtuple

# xy 坐标系
XYCoord = namedtuple("XYCoord", ["x", "y"])

# 定义绘图区域尺寸，这里只是借用 xy 坐标，分别表示 x、y 方向的尺寸
graph_size = XYCoord(500, 500)

layout = [
    [sg.Graph(canvas_size=graph_size, graph_bottom_left=(0, graph_size.y), graph_top_right=(graph_size.x, 0), background_color="white", key = "-GRAPH-", drag_submits=True, enable_events = True)],
    # [sg.Graph.draw_circle(center_location=(0,0),radius=(1,3))],
    [sg.OK(), sg.Cancel()],
    sg.Pane([col5, sg.Column([[sg.Pane([col1, col2, col4], handle_size=15, orientation='v',  background_color=None, show_handle=True, visible=True, key='_PANE_', border_width=0,  relief=sg.RELIEF_GROOVE),]]),col3 ], orientation='h', background_color=None, size=(160,160), relief=sg.RELIEF_RAISED, border_width=0)

]
window = sg.Window("画布主题",layout)
envent,values = window.read()
window.close()
print(envent,values)